home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilcli / mscclcmd.lha / ERP15.doc < prev    next >
Text File  |  1996-09-23  |  12KB  |  277 lines

  1. EasyRequestPatch V1.5 by Chris Hodges
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. Introduction
  5. ~~~~~~~~~~~~
  6.  
  7. A friend of mine once asked me, if I could write a little program  for  his
  8. BBS  that  would  cancel  all the system-requesters that may appear, as his
  9. harddisk brought up read/write errors which were not really existant.
  10.  
  11. So this is my first attempt for  such  a  patch.  I  thought  somebody  had
  12. already  invented  a  program like this, but none of the asked sysops could
  13. help.
  14.  
  15. The patch will kill any requester that matches a pattern given in a  config
  16. file. Other requesters will not be harmed at all.
  17.  
  18. I tried to make this program as secure and efficient  as  possible,  and  I
  19. suppose this program is ;-)
  20.  
  21. Requirements
  22. ~~~~~~~~~~~~
  23. EasyRequestPatch needs Kick 2.04 or higher and about 12 KB of memory.
  24.  
  25. Usage
  26. ~~~~~
  27.  
  28. Run >NIL: ERP [configfile] [QUIT] [LOGFILE filename] [QUIET]
  29.  
  30. (Template: CONFIG,QUIT/S,LOGFILE/K,QUIET/S)
  31.  
  32. As you can see, the program does not unhook itself. The config file must be
  33. specified  if you install the patch, to remove the patch again, ERP QUIT is
  34. sufficient. If you want to get a logfile of all activities, you can add the
  35. LOGFILE  argument  with the filename where all the data should be saved. If
  36. this file already exists, the new text  will  be  appended.  The  file  has
  37. shared  access,  will  be  only  written into in 2 minutes intervals and is
  38. closed after each writing operation, so you can have a look at  it  at  any
  39. time.
  40.  
  41. Configuration
  42. ~~~~~~~~~~~~~
  43. An example configuration file has been included in the archive.
  44.  
  45. The configuration file is  a  normal  AmigaDOS  ascii-text.  It  may  *NOT*
  46. contain other line seperators than linefeeds (no CRs allowed!).
  47.  
  48. Empty lines and characters after a semicolon are ignored.
  49.  
  50. A configuration line looks like this:
  51.  
  52. pattern,(delay,gadgetnum,retries)
  53. or
  54. pattern,(delay,gadgetnum,retries),(delay,gadgetnum,retries),... etc.
  55.  
  56. The pattern string may contain any normal dos jokers. Use quotemarks  where
  57. required.  Behind  the  pattern  you  have  to  enter  at  least  one group
  58. containing three defining values. You can define up to  five  such  groups.
  59. delay  is used to specify the time to pass before ERP answers the requester
  60. with the given gadget number. These delays have to be entered in  units  of
  61. 1/50 secs.
  62.  
  63. This action will be repeated until the requester shuts up or the number  of
  64. retries  has been overridden. If this happens, the next group will be taken
  65. for the requester, or if it already has been the last group, the  requester
  66. will pop up as usually.
  67.  
  68. The gadgets in each requester are placed in ascending order from 1 to  N-1,
  69. whereas  N  represents the total amount of gadgets in the dialogue box. The
  70. last gadget (often 'Cancel') is always gadget number 0.
  71.  
  72. There are few 'special' gadgetnumbers:
  73.  
  74. -1: Is used to behave as if an IDCMP event has occurred (often this has the
  75.     same result as clicking on the 'Retry' gadget).
  76.  
  77. -2: Just waits the amount of time you give with the delay instruction.
  78.  
  79. -3: Flashes the display and beeps the given number of times.
  80.  
  81. -4: Resets the computer after the given delay. Please note that this  delay
  82.     should  be  at  least  5  seconds (=250 ticks), to ensure that all disk
  83.     activity (e.g the logfile) has been stopped.
  84.  
  85. -5: Like -4, but kills the exec base to avoid a guru meditation on  bootup.
  86.     There's  no need to do that on kick 3.x machines as the guru has a time
  87.     out check from kick 3.x on.
  88.  
  89. Note that the patterns are proccessed in that order they have been  entered
  90. into. There can be as many pattern definitions as you like.
  91.  
  92. Version V1.5 introduces new configuration  variables  for  use  within  the
  93. config  file.  Lines containing variables must begin with a '@' symbol. The
  94. parameter can be either a '+' (plus) to activate  the  variable  or  a  '-'
  95. (minus) to deactivate the function or a number. Whatever you use, it has to
  96. be placed directly behind the variable, so there mustn't be a space between
  97. them.  You can enter multiple variables into one line seperated by a space.
  98. The variables are case sensitive (currently).
  99.  
  100. These are the currently available variables:
  101.  
  102. taskpri      : Sets the task priority for ERP. Only  negative  values  from
  103.                -127  to  -1 are allowed. By default, the task priority will
  104.                not be changed.
  105. checkdelay   : This value contains the amount of ticks between the check in
  106.                the  main  loop. Setting it to a high value will use up less
  107.                cpu time (not much really).  You  should  not  enter  higher
  108.                values than 500. Default is 10.
  109. remembertime : Contains the amount of ticks the last  requester  should  be
  110.                remembered  (see Notes for more details). Should be at least
  111.                100 and more than checkdelay.
  112. logupdatetime: This is the time, after which the logfile should be updated.
  113.                Can  be any value you want, but keep it above the checkdelay
  114.                value. Default is 6000.
  115. logtime      : If set to '+' the logfile then  contains  the  time  when  a
  116.                requester had been called. This is default.
  117. logdate      : If set to '+' the log will be saved along with the  date  of
  118.                the event. Default is '-'.
  119. logtaskname  : Setting this to '+' will save the name of the  task  causing
  120.                the requester. Default is '-'.
  121. logreqtext   : Normally, the body of the requester will  be  saved  in  the
  122.                logfile. You can disable this using 'logreqtext-'.
  123. maxtextlen   : Sets the maximum length of the requester text to  be  saved.
  124.                Default is 48.
  125. textnospace  : To  get  more  information  into  the  limited  space,   the
  126.                requester text will be normally shortened by cutting out all
  127.                it's space  characters.  This  can  be  disabled  using  the
  128.                'textnospace-' option.
  129.  
  130. Notes
  131. ~~~~~
  132.  
  133. Due to the dynamic linked lists used in this program, it could happen  that
  134. this  program  fragmentates  your  memory.  To  prevent this I use reversed
  135. memory allocation to avoid little scattered memory blocks.
  136.  
  137. These linked lists are required to distinguish between different  requester
  138. coming  from different tasks. As there is no possibility to check whether a
  139. requester has been killed successfully (i.e the program is  satisfied  with
  140. the  result  and  does not opens the requester again), the program reserves
  141. some memory to save some information  about  the  requester.  If  the  same
  142. requester  appears  within  ten  seconds  ERP  acts  according to the group
  143. behaviour. Otherwise the memory is freed and  the  old  requester  will  be
  144. forgotten.
  145.  
  146. History
  147. ~~~~~~~
  148. V1.5 (11-Nov-95):
  149. ~~~~~~~~~~~~~~~~~
  150. - Helau!
  151. - Arrrggglll! Due to a typing mistake (FreeMem instead of FreeVec), in V1.4
  152.   every  patch call would eat up 4 KB of memory which wasn't freed anymore.
  153.   Fixed.
  154. - Yeah! Added configuration variables. Now every single thing can be set up
  155.   from the config file.
  156. - Fixed a bug which displayed a random line number if the config  file  had
  157.   an error.
  158. - Added LOGFILE option. A shared lock file will be used for this purpose so
  159.   you can have a look at it at any time.
  160. - Added QUIET option. Now only error messages  will  be  sent  to  the  cli
  161.   window.
  162.  
  163. V1.4 (30-Oct-95):
  164. ~~~~~~~~~~~~~~~~~
  165. - Logical error with the stack problem. If the patch is called  the  second
  166.   time  it  runs  through  it's  routines, the stack space clashed. This is
  167.   fixed now.
  168. - Now uses real exec semaphores.
  169.  
  170. V1.3 (01-Oct-95):
  171. ~~~~~~~~~~~~~~~~~
  172. - No stack problems anymore. Now uses it's own stack for the patch routine.
  173.  
  174. V1.2 (25-Aug-95):
  175. ~~~~~~~~~~~~~~~~~
  176. - Crashed on MC68000 due to one (!) accidentially used 68020  instructions.
  177.   Fixed.
  178. - Not enough stack will pop up the requester now.
  179. - Added stack checking. Now it cannot crash anymore due to too  few  stack.
  180.   Minimum stack required for pattern matching: 1500 bytes.
  181. - Moved the pattern token creation to the config parsing, so the patch  has
  182.   become a little big faster.
  183. - The bug with the Ctrl-C key doesn't appear anymore.
  184.  
  185. V1.1 (28-Jul-95):
  186. ~~~~~~~~~~~~~~~~~
  187. - Since there were problems with read write errors, I've  set  the  maximum
  188.   quantum up again to 10 seconds.
  189. - Fixes some little bugs which caused the requester  to  be  forgotten  too
  190.   early.
  191. - The fixes didn't help at all. Seems as if read/write errors lock  up  the
  192.   dos  output  routines,  so  I have added a new linked list containing the
  193.   output strings so they can be printed by the main program. This allows me
  194.   to  use  buffered  string  printing  again.  Now  it finally *should* run
  195.   correctly.
  196. - Those little annoying bugs... logical mistake locked  the  output  buffer
  197.   list  during  output  so  the  requester  hung again. Fixed using another
  198.   little buffer. If it now doesn't run, I'll give it up.
  199.  
  200. V1.0 (26-Jul-95):
  201. ~~~~~~~~~~~~~~~~~
  202. - The logfile was a little bit faulty due to the mixed  usage  of  buffered
  203.   and non-buffered writing. This has been fixed now.
  204. - Changed the main loop quantum from 1 VBL delay  to  10  VBLs.  This  will
  205.   reduce the cpu usage.
  206. - Changed the requester-timeout to two seconds instead of one.
  207. - Modified the parser to check for more errors.
  208. - Increased the general buffers a bit.
  209. - Strange things seem to happen: The last program opening a requester, will
  210.   get the control-c signal passed through. No clue why this happens and how
  211.   to prevent it. Please use 'ERP Quit' instead of the Ctrl-C key.
  212. - Added the wait and reset events.
  213. - Added the beep and hard reset events.
  214.  
  215. V1.0ß (25-Jul-95):
  216. ~~~~~~~~~~~~~~~~~~
  217. - First release. Works quite well.
  218.  
  219. Copyright notice
  220. ~~~~~~~~~~~~~~~~
  221. EasyRequestPatch (ERP) and it's documentation are Copyright © 1995 by Chris
  222. Hodges. All rights reserved.
  223.  
  224. Disclaimer
  225. ~~~~~~~~~~
  226. EasyRequestPatch has proven to be stable in everyday use. The author is not
  227. responsible  for any loss of data, damages to software or hardware that may
  228. result directly or indirectly from the use  of  this  program.  The  author
  229. reserves the right to make changes to the software or documentation without
  230. notice.
  231.  
  232. Bugreports and comments are appreciated. Please  send  them  to  the  email
  233. address below.
  234.  
  235. Shareware note
  236. ~~~~~~~~~~~~~~
  237. This program is free distributable, this means that you can copy it  freely
  238. as  long  as  you  don't  ask  any more money for it than a nominal fee for
  239. copying. If you want to distribute this program you must keep this document
  240. with  it.  This  program  cannot  be  used  for commercial purposes without
  241. written permission from the author.
  242.  
  243. None of the files of the ERP package may be modified or  left  out  without
  244. permission of the author. Crunching or archiving is allowed only if none of
  245. the ERP files get modified by it. Adding BBS adverts or similar to such  an
  246. archive is forbidden.
  247.  
  248. Moreover, it is forbidden to use ERP following conditions:
  249.  
  250. - For construction, development, creation or testing of weapons or
  251.   any other types of arms.
  252. - Your name is Marc Stachel (better known as Charlie/KF) or
  253.   Florian Graßinger (Mirage/KF).
  254.  
  255. ERP may not  be  included  in  archives  containing  the  mailbox  software
  256. 'FastCall'  or 'Prometheus' nor in archives with indirect or direct Krypton
  257. Force productions.
  258.  
  259. If you use  this  program  regularily,  the  author  would  appreciate  any
  260. donation  you  could  give  him,  otherwise  you'll  should not use ERP any
  261. longer! Especially SysOps could register this program as  they  really  may
  262. need ERP for his/her BBS.
  263.  
  264. ERP registration counter: 0001 (=US$10 in total)
  265.  
  266. Contact address
  267. ~~~~~~~~~~~~~~~
  268. Any mails or donations to:
  269.  
  270. Chris Hodges                    Account: 359 68 63
  271. Kennedystr. 8                   BLZ    : 700 530 70
  272. D-82178 Puchheim                Bank   : Sparkasse Fürstenfeldbruck
  273. Germany
  274. Tel.: +49-89/8005856
  275. Email: chris@sixpack.pfalz.de
  276.  
  277.